﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './user/login' },
      { name: '注册', path: '/user/register', component: './user/register' },
    ],
  },
  { path: '/', redirect: '/home' },
  { path: '/home', layout: false, name: '首页', component: './home' },
  // 在现有路由配置中添加以下内容
  {
    path: '/showcase',
    layout: false,
    routes: [
      {
        path: '/showcase/excellent-coaches',
        name: '优秀教练',
        component: './showcase/excellentCoaches',
      },
      {
        path: '/showcase/excellent-students',
        name: '优秀学员',
        component: './showcase/excellentStudents',
      },
    ],
  },

  // { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' },
  { path: '/dashboard', name: '操作台', icon: 'smile', component: './dashboard' },
  {
    path: '/statistic',
    access: 'canAdmin',
    name: '数据统计',
    icon: 'BarChartOutlined',
    component: './statistic',
  },
  // { path: '/signRecord', name: '签到记录', icon: 'BarChartOutlined', component: './signRecord' },
  //学员
  { name: '我的训练计划', access: 'canUser', path: '/user/userPlan', component: './user/userPlan' },
  { name: '加入班级', access: 'canUser', path: '/user/joinClass', component: './user/joinClass' },
  { name: '我的班级', access: 'canUser', path: '/user/classInfo', component: './user/classInfo' },
  { name: '教练评价', access: 'canUser', path: '/user/evaluation', component: './user/evaluation' },
  // 教练
  { name: '我的学员', access: 'canCoach', path: '/coach/user', component: './coach/user' },
  { name: '训练计划制定', access: 'canCoach', path: '/coach/plan', component: './coach/plan' },
  {
    name: '学员训练管理',
    access: 'canCoach',
    path: '/coach/userPlan',
    component: './coach/userPlan',
  },
  {
    name: '学员评价',
    access: 'canCoach',
    path: '/coach/evaluation',
    component: './coach/evaluation',
  },
  {
    name: '我的班级',
    access: 'canCoach',
    path: '/coach/classInfo',
    component: './coach/classInfo',
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user' },
      { name: '用户管理', icon: 'table', path: '/admin/user', component: './admin/user' },
      { name: '训练计划管理', icon: 'table', path: '/admin/plan', component: './admin/plan' },
      {
        name: '用户训练管理',
        icon: 'table',
        path: '/admin/userPlan',
        component: './admin/userPlan',
      },
      {
        name: '评价管理',
        icon: 'table',
        path: '/admin/evaluation',
        component: './admin/evaluation',
      },
      { name: '班级管理', icon: 'table', path: '/admin/classInfo', component: './admin/classInfo' },
      {
        name: '用户班级管理',
        icon: 'table',
        path: '/admin/userClassInfo',
        component: './admin/userClassInfo',
      },
      { name: '训练规则管理', icon: 'table', path: '/admin/rule', component: './admin/rule' },
      {
        name: '公告管理',
        icon: 'table',
        path: '/admin/announcement',
        component: './admin/announcement',
      },
      // { name: '文件管理', icon: 'table', path: '/admin/fileInfo', component: './admin/fileInfo'},
      // { name: '签到管理', icon: 'table', path: '/admin/sign', component: './admin/sign'},
    ],
  },
  {
    path: '/account/info',
    name: '个人信息',
    icon: 'user',
    component: './account',
  },
  { path: '*', layout: false, component: './404' },
];
